<!--#include file="common.asp"-->
<%
'apis depends on libs and only use for json request
  call page_load()
  '页面加载主函数：对于API来件是入口
  function page_load()
  	dim sAction
  	dim output
  	sAction = request.form("action")
  	select case sAction
  		case "action-name"
  			output = "action-result"
  	end select
  	response.clear
  	response.write(output)
  	response.end
  end function
  'API business
  public function demo()
      demo = "demo text"
  end function
  '公共函数
  public function buildJsonResponse(state,msg,data)
    dim resp
    set resp=server.createobject("scripting.dictionary")
    resp.add "state", state
    resp.add "message", msg
    resp.add "data", data
    buildJsonResponse = jsonConvertor.toJson(empty, resp, false)
  end function
%>